#include"MyHash.h"

namespace bit {
	template<class K,class Hash = hash_bucket::HashFunc<K> >
	class unordered_set {
		struct SetKeyOft {
			const K& operator()(const K& k) {
				return k;
			}
		};
	public:
		typedef typename hash_bucket::HashTable<K, const K, SetKeyOft, Hash>::Iterator iterator;
		typedef typename hash_bucket::HashTable<K, const K, SetKeyOft, Hash>::Const_Iterator const_iterator;
		iterator begin() {
			return _ht.begin();
		}
		iterator end() {
			return _ht.end();
		}

		

		pair<iterator, bool> insert(const K& kv) {
			return _ht.Insert(kv);
		}

		bool erase(const K& k) {
			return _ht.Erase(k);
		}
		pair<iterator, bool> find(const K& k) {
			return _ht.Find(k);
		}

	private:
		hash_bucket::HashTable<K, const K, SetKeyOft, Hash> _ht;
	};

}

